snippet main "main"
#include <iostream>

int main()
{
	$0
	return 0;
}
endsnippet

snippet null "null" i
nullptr
endsnippet

snippet else "else"
else {
	$0
}
endsnippet

snippet # "#"
#include <$1>$0
endsnippet

snippet #def "#def"
#define 
endsnippet

snippet class "class"
class $1
{
public:
	$1();
	$1(const $1&);
	$1& operator=(const $1&);
	~$1();
protect:
private:

}
endsnippet

snippet std "std"
using namespace std;
endsnippet

snippet if "if"
if (${1:true}) {
	$0
}
endsnippet

snippet for "for"
for (int ${1:i} = 0; $1 < $2; $1++) {
	$0
}
endsnippet

snippet box "Box"
`!p 
slist = t[1].split('\n')
llist = []
for s in slist:
	llist.append(int((len(s.encode('utf-8'))-len(s))/2) + len(s))
snip.rv = '/*' + '*' * (max(llist) + 2) + '*'`
 * $1
`!p 
slist = t[1].split('\n')
llist = []
for s in slist:
	llist.append(int((len(s.encode('utf-8'))-len(s))/2) + len(s))
snip.rv = ' ' + '*' * (max(llist) + 2) + '*/'`
$0
endsnippet

snippet void "void"
void $1($2)
{
	$0
}
endsnippet

